#include "../Kinematic.h"
#include "../Steering.h"
#include "../Vectores.h"
#include "../Character.h"
#include "../CApp.h"

#include <vector>

using namespace std;

Behavior::Behavior(){
  theCharacter = NULL;
  theTarget = NULL;
  character = NULL;
  target = NULL;
}

void Behavior::SetTarget(Character* k){
  theTarget =k;
  if(theTarget){
    if(target) delete target;
    target = theTarget->getKinematic();
  }
}

const Character* Behavior::GetCharacter(){
  return theCharacter;
}

void Behavior::SetCharacter(Character* k){
  theCharacter=k;
  if(theCharacter){
    if(character) delete character;
    character = theCharacter->getKinematic();
  }
}

void Behavior::updateKinematicData(){
  if(theCharacter){
    if(character) delete character;
    character = theCharacter->getKinematic();
  }
  if(theTarget){
    if(target) delete target;
    target = theTarget->getKinematic();
  }
}

const Character* Behavior::GetTarget(){
  return theTarget;
}
